using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ShopForWeb.Model.View
{
  public class ProductView
  {
    /// <summary>
    /// 分类Id
    /// </summary>
    public long CategoryId { get; set; }

    /// <summary>
    /// 图片，文件的路径
    /// </summary>

    public string Photo { get; set; } = "";

    /// <summary>
    /// 价格
    /// </summary>

    public decimal Price { get; set; }

    /// <summary>
    /// 简介
    /// </summary>

    public string ProductContent { get; set; } = "";

    /// <summary>
    /// 商品Id，自增
    /// </summary>

    public long ProductId { get; set; }

    /// <summary>
    /// 商品名称
    /// </summary>

    public string ProductName { get; set; } = "";

    /// <summary>
    /// 状态码
    /// </summary>
    public int StatusCode { get; set; }

    public string StatusLabel
    {
      get
      {
        if (StatusCode == 1) return "上架";
        else return "下架";
      }
    }
    public string CategoryName { get; set; } = "";

  }
}